<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <title>Use Strict 下 this</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="basic.js"></script>
</head>
<script>
    var testA = {
        doTest: function () {
            console.log(this);
            return function () {
                console.log(this);
            }
        },

    };
    testA.doTest()();

    class YTest{
        constructor(){
            this.a=1;
        }
        getA(){
            console.log(this);
            return ()=>{
                console.log(this);
            }
        }
    }
    (new YTest()).getA()();

    (function () {
        'use strict';
        const self = this;
        var testA = {
            doTest: function () {
                console.log(this);
                return  () => {
                    console.log(this);
                }
            },

        };
        testA.doTest()();

    }())
</script>

<body>

</body>

</html>